#import "QuenchVelvetController.h"
        
#import "QuenchVelvetModel.h"
#import "QuenchVelvetCell.h"
#import "Masonry.h"

@interface QuenchVelvetController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *yearnCollectionView;
@property (nonatomic, strong) NSMutableArray *lanternJoyousLuminousModels;

@end

@implementation QuenchVelvetController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self lushWonderSetupui];
	[self charismaKaleidoscopegetData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)lanternJoyousLuminousModels {
	if (!_lanternJoyousLuminousModels) {
		_lanternJoyousLuminousModels = [NSMutableArray array];
	}
	return _lanternJoyousLuminousModels;
}

//: 获取数据模型
- (void)charismaKaleidoscopegetData {
	
}

- (void)lushWonderSetupui {
    UICollectionViewFlowLayout *enchanting = [[UICollectionViewFlowLayout alloc] init];
    enchanting.minimumLineSpacing = 10;
    enchanting.minimumInteritemSpacing = 10;
    enchanting.itemSize = CGSizeMake(100, 100);
    enchanting.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.yearnCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:enchanting];
    self.yearnCollectionView.backgroundColor = UIColor.clearColor;
    self.yearnCollectionView.delegate = self;
    self.yearnCollectionView.dataSource = self;
    self.yearnCollectionView.showsHorizontalScrollIndicator = NO;
    self.yearnCollectionView.showsVerticalScrollIndicator = NO;
    [self.yearnCollectionView registerClass:[QuenchVelvetCell class] forCellWithReuseIdentifier:NSStringFromClass([QuenchVelvetCell class])];
    
    [self.view addSubview:self.yearnCollectionView];
    [self.yearnCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.lanternJoyousLuminousModels.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    QuenchVelvetCell *freedomXenialOasis = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([QuenchVelvetCell class]) forIndexPath:indexPath];
    return freedomXenialOasis;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
